<script lang="ts">
import {Ref, ref} from "vue";

export default {
  name: "App",
  setup() {
    const count: Ref<number> = ref<number>(0)
    const handleAdd: () => void = (): void => {
      count.value++
    }

    return{
      count,
      handleAdd
    }
  }
}
</script>

<template>
  <div class="app">
    <el-card>
      <template #header>
        <el-link type="danger">count的值是:{{count}}</el-link>
      </template>
      <el-button @click="handleAdd">+1</el-button>
    </el-card>
  </div>
</template>

<style scoped>
.app {
  width: 800px;
  height: 300px;
  margin: 0 auto;
}
</style>
